<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%--
    This file is an entry point for JavaServer Faces application.
--%>
<f:view>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1><h:outputText value="Dodaj użytkownika" /></h1>
        <h:form>
            <h:panelGrid columns="2">
                <h:outputText value="Data"/>
                <h:inputText id="birthDate" value="#{data.date}"/>
                <h:message errorStyle="color:red" tooltip="true" for="birthDate"/>

                <p><h:outputText value="Password"/>
                <h:inputText value="#{data.password}"/></p>

                <p><h:outputText value="Login"/>
                <h:inputText value="#{data.login}"/></p>

                <p><h:outputText value="Name"/>
                <h:inputText value="#{data.name}"/></p>

                <p><h:outputText value="Surname"/>
                <h:inputText value="#{data.surname}"/></p>

                <p><h:outputText value="Email"/>
                <h:inputText value="#{data.email}"/></p>

                <p><h:outputText value="Address"/>
                <h:inputText value="#{data.address}"/></p>

                <p><h:outputText value="City"/>
                <h:inputText value="#{data.city}"/></p>

                <p><h:outputText value="Postcode"/>
                <h:inputText value="#{data.postcode}"/></p>

                <p><h:outputText value="Country"/>
                <h:inputText value="#{data.country}"/></p>

                <p><h:outputText value="Phone"/>
                <h:inputText value="#{data.phone}"/></p>
            </h:panelGrid>
            <h:commandButton value="Dodaj" action="#{data.dodaj}">
                <f:param name="ok" value="ok"/>
            </h:commandButton>
        </h:form>
    </body>
</html>
</f:view>
